import request from '@/utils-shop/request'

// api地址
const api = {
  list: 'user.grade/list',
  detail: 'user.grade/detail',
  add: 'user.grade/add',
  edit: 'user.grade/edit',
  remove: 'user.grade/delete',
}

// 员工列表
export const list = param => {
  return request.get(api.list, param)
}

// 员工详情
export const detail = gradeId => {
  return request.get(api.detail, { gradeId })
}

// 添加员工
export const add = (data) => {
  return request.post(api.add, { form:data })
}

// 编辑员工
export const edit = (gradeId, data) => {
  return request.post(api.edit, { gradeId, form:data })
}

// 删除员工
export const remove = gradeId => {
  return request.post(api.remove, { gradeId })
}

